$(function(){
    var guanwang={
        data:{
            Eng_month:["January" ,"February", "March", "April" ,"May" ,"June","July","August","September","October","November","December"]
        },
        event:function () {

        },
        init:function () {
            var that=this;
            var id=location.href.match(/caseId=(\d+)/)&&location.href.match(/caseId=(\d+)/)[1];
            if(id){
                JsonP({
                    url:guanwangID+"index.php?s=home/Casus/listCasusQueryItem",
                    data:{
                        id:id
                    },
                    success:function (res) {
                        if(res.resStatus===1){
                            var o=res.data[0];
                            console.log(o);
                          var text_string=' <div class="col-xs-3">' +
                              '                    <div class="anli_item_wrap">' +
                              '                        <p>项目名称</p>' +
                              '                        <p>'+o.title+'</p>' +
                              '                    </div>' +
                              '                </div>' +
                              '                <div class="col-xs-3">' +
                              '                    <div class="anli_item_wrap">' +
                              '                         <p>项目类型</p>' +
                              '                         <p>'+o.casus_type+'</p>' +
                              '                    </div>' +
                              '                </div>' +
                              '                <div class="col-xs-3">' +
                              '                    <div class="anli_item_wrap">' +
                              '                        <p>工程面积</p>' +
                              '                        <p>'+o.scope+' m²</p>' +
                              '                    </div>' +
                              '                </div>' +
                              '                <div class="col-xs-3">' +
                              '                    <div class="anli_item_wrap">' +
                              '                        <p>工程预算</p>' +
                              '                        <p>'+o.price+' 万</p>' +
                              '                    </div>' +
                              '                </div>';
                          $(".anli_text_wrap").empty().append(text_string);

                          var body_string='<p><a href="/">首页</a> > <a href="anli.html">盛铭吉案例</a> > '+o.title+'</p>' +
                                                '<div class="anli_detial_content">'+o.content+'</div>';
                          $(".anli_detial_wrap").empty().append(body_string);
                          var um_content=$(".anli_detial_content").text();
                            $(".anli_detial_content").empty().append(um_content);
                            var p_left='<p></p>';
                            var p_right='<p></p>';
                            o.casusDataNum.next && (p_left='<p><a href="anli_detial.html?caseId='+o.casusDataNum.next.data_id+'"><span>上一篇</span> <b>'+o.casusDataNum.next.title+'</b></a></p>');
                            o.casusDataNum.previous && (p_right='<p><a href="anli_detial.html?caseId='+o.casusDataNum.previous.data_id+'"><span>下一篇</span> <b>'+o.casusDataNum.previous.title+'</b></a></p>');
                            $(".f_nav_wrap").empty().append(p_left+p_right);
                        }
                    }
                });
            }


        }
    };

    guanwang.init();
});